package com.ztmg.common.util;

import com.github.pagehelper.PageInfo;
import org.springframework.beans.BeanUtils;

import java.util.List;

public class PageUtil {
    public static <E> PageInfo<E> transData(PageInfo source, List<E> target) {
        PageInfo<E> result = new PageInfo<>();
        BeanUtils.copyProperties(source, result);
        result.setList(target);
        return result;
    }
}
